package com.twotwoshop.service.goods.job;


import com.twotwoshop.service.goods.service.ProductHotService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RequiredArgsConstructor
public class hotgoodsJob {

    private final ProductHotService productHotService;

    @XxlJob("computeHotGoodsJob")
    public void handle(){

        log.info("商品浏览次数计算调度任务执行...");

        //商品浏览次数计算
        productHotService.computeHotGoods();

        //商品收藏信息同步
        productHotService.computeFavouriteGoods();
    }

}
